/*
 * @Author: g05047
 * @Date: 2021-05-27 09:06:50
 * @LastEditors: g05047
 * @LastEditTime: 2021-06-11 11:04:20
 * @Description: file content
 */
import { PAGELIST, HEADINFO, BASEINFO, FINANCEINFO, MEMBERINFO, PROJECTCONFIG, UPDATEPROJECTCONFIG, DELMEMBER, ADDORUPDATEMEMBER, SEARCHUSER, SEARCHDEPT, UPDATEBASICINFO, UPDATEFINANCEINFO, STATISTICS, getAllCityApiPath, PROJECT_CONFIG, UPDATE_CONFIG } from '@/services/api';
import { request, METHOD } from '@/utils/request';

export async function getPageList(params) {
    return request(PAGELIST, METHOD.POST, params);
}
export async function getHeadInfo(params) {
    return request(HEADINFO, METHOD.GET, params);
}
export async function getBaseInfo(params) {
    return request(BASEINFO, METHOD.GET, params);
}
export async function getFinanceInfo(params) {
    return request(FINANCEINFO, METHOD.GET, params);
}
export async function getMemberInfo(params) {
    return request(MEMBERINFO, METHOD.GET, params);
}
export async function getCareerField(params) {
    return request(PROJECTCONFIG, METHOD.GET, params);
}
export async function getUpdateProjectConfig(params) {
    return request(UPDATEPROJECTCONFIG, METHOD.POST, params);
}
export async function getDelMember(params) {
    return request(DELMEMBER, METHOD.GET, params);
}
export async function getAddOrUpdateMember(params) {
    return request(ADDORUPDATEMEMBER, METHOD.POST, params);
}
export async function getSearchUser(params) {
    return request(SEARCHUSER, METHOD.POST, params);
}
export async function getSearchDept(params) {
    return request(SEARCHDEPT, METHOD.GET, params);
}
export async function getUpdateBasicInfo(params) {
    return request(UPDATEBASICINFO, METHOD.POST, params);
}
export async function getUpdateFinanceInfo(params) {
    return request(UPDATEFINANCEINFO, METHOD.POST, params);
}
export async function getStatistics() {
    return request(STATISTICS, METHOD.GET);
}
export async function getProjectCity() {
    return request(getAllCityApiPath, METHOD.GET);
}
export async function getProjectConfig(params) {
    return request(PROJECT_CONFIG, METHOD.GET, params);
}
export async function getUpdateConfig(params) {
    return request(UPDATE_CONFIG, METHOD.POST, params);
}

export default {
    getPageList,
    getHeadInfo,
    getBaseInfo,
    getFinanceInfo,
    getMemberInfo,
    getCareerField,
    getUpdateProjectConfig,
    getDelMember,
    getAddOrUpdateMember,
    getSearchUser,
    getSearchDept,
    getUpdateBasicInfo,
    getUpdateFinanceInfo,
    getStatistics,
    getProjectCity,
    getProjectConfig,
    getUpdateConfig,
};
